package com.aspose.cells;

class zbdr extends zcj {
   private float i = 0.0F;

   zbdr(zn var1, float var2, float var3, zbkq var4) {
      super(var1, var2, var3, var4);
   }

   void a() {
      float var1 = this.g;
      float var2 = this.h;
      float var3 = this.e.k().h();
      float var4 = this.e.k().i();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq(var1, var2, var3, var4);
      com.aspose.cells.b.a.b.a.zf var6 = this.a.e();
      this.a.a(4);
      com.aspose.cells.b.a.b.a.ze var7 = new com.aspose.cells.b.a.b.a.ze();
      var7.b(var5);
      com.aspose.cells.b.a.b.zc var8 = zbul.a(this.e.l(), var7);
      com.aspose.cells.b.a.b.zm var9 = zbul.a(this.e.m());
      if (this.e.l.a.size() > 0) {
         this.i = var5.i() * (float)((zak)this.e.l.a.get(0)).a() / 21600.0F;
      } else {
         this.i = var5.i() * 0.25F;
      }

      com.aspose.cells.b.a.b.zo[] var10 = new com.aspose.cells.b.a.b.zo[4];
      com.aspose.cells.b.a.b.zq var11;
      com.aspose.cells.b.a.b.zq var12;
      if (!this.e.l().a()) {
         if (this.i == 0.0F) {
            this.a.b(var8, var5);
         } else {
            switch(this.e.a) {
            case 1:
            case 4:
               var11 = new com.aspose.cells.b.a.b.zq(var5.d(), new com.aspose.cells.b.a.b.zt(var5.h(), this.i));
               var12 = new com.aspose.cells.b.a.b.zq(var5.d(), new com.aspose.cells.b.a.b.zt(var5.h(), this.i));
               var10[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i / 2.0F + this.h);
               var10[1] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i / 2.0F + this.h);
               var10[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + (var5.i() - 2.0F * this.i) + this.i / 2.0F + this.h);
               var10[3] = new com.aspose.cells.b.a.b.zo(this.g, this.i + (var5.i() - 2.0F * this.i) + this.i / 2.0F + this.h);
               com.aspose.cells.b.a.b.zc var13 = null;
               if (this.e.l().d()) {
                  var13 = zbul.a(this.e.l(), var7, 0.8F, 0.0F);
               } else if (this.e.l().b().toArgb() == Color.getWhite().toArgb()) {
                  var13 = var8;
               } else {
                  var13 = zbul.a(this.e.l(), var11, 0.8F, 80.0F);
               }

               this.a.a(var13, var11);
               com.aspose.cells.b.a.b.a.ze var14 = new com.aspose.cells.b.a.b.a.ze();
               var14.a(var12, 0.0F, 180.0F);
               var14.a(var10[0], var10[3]);
               var12.b(this.i + var5.i() - 2.0F * this.i + this.h);
               var14.a(var12, 180.0F, -180.0F);
               var14.a(var10[2], var10[1]);
               var14.i();
               this.a.a(var8, var14);
               break;
            case 2:
            case 3:
               com.aspose.cells.b.a.b.zq var15 = new com.aspose.cells.b.a.b.zq(var1, var2 + var4 - this.i, var3, this.i);
               com.aspose.cells.b.a.b.zq var16 = new com.aspose.cells.b.a.b.zq(var1, var2 + var4 - this.i, var3, this.i);
               var10[0] = new com.aspose.cells.b.a.b.zo(this.g, var4 - this.i / 2.0F + this.h);
               var10[1] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var4 - this.i / 2.0F + this.h);
               var10[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i / 2.0F + this.h);
               var10[3] = new com.aspose.cells.b.a.b.zo(this.g, this.i / 2.0F + this.h);
               com.aspose.cells.b.a.b.zc var17 = null;
               if (this.e.l().d()) {
                  var17 = zbul.a(this.e.l(), var7, 0.8F, 0.0F);
               } else if (this.e.l().b().toArgb() != Color.getWhite().toArgb()) {
                  var17 = zbul.a(this.e.l(), var15, 0.8F, 80.0F);
               }

               this.a.a(var17, var15);
               com.aspose.cells.b.a.b.a.ze var18 = new com.aspose.cells.b.a.b.a.ze();
               var18.a(var16, 0.0F, -180.0F);
               var18.a(var10[0], var10[3]);
               var16.b(this.h);
               var18.a(var16, 180.0F, 180.0F);
               var18.a(var10[2], var10[1]);
               var18.i();
               this.a.a(var8, var18);
            }
         }
      }

      if (!this.e.m().a()) {
         if (this.i == 0.0F) {
            this.a.a(var9, (int)var1, (int)var2, (int)var3, (int)var4);
         } else {
            switch(this.e.a) {
            case 1:
            case 4:
               var11 = new com.aspose.cells.b.a.b.zq(var5.d(), new com.aspose.cells.b.a.b.zt(var5.h(), this.i));
               var12 = new com.aspose.cells.b.a.b.zq(var5.d(), new com.aspose.cells.b.a.b.zt(var5.h(), this.i));
               var10[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i / 2.0F + this.h);
               var10[1] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i / 2.0F + this.h);
               var10[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + (var5.i() - 2.0F * this.i) + this.i / 2.0F + this.h);
               var10[3] = new com.aspose.cells.b.a.b.zo(this.g, this.i + (var5.i() - 2.0F * this.i) + this.i / 2.0F + this.h);
               this.a.a(var9, var11);
               this.a.a(var9, var12, 0.0F, 180.0F);
               this.a.a(var9, var10[0], var10[3]);
               var12.b(this.i + var5.i() - 2.0F * this.i + this.h);
               this.a.a(var9, var12, 180.0F, -180.0F);
               this.a.a(var9, var10[2], var10[1]);
               break;
            case 2:
            case 3:
               com.aspose.cells.b.a.b.zq var20 = new com.aspose.cells.b.a.b.zq(var1, var2 + var4 - this.i, var3, this.i);
               com.aspose.cells.b.a.b.zq var19 = new com.aspose.cells.b.a.b.zq(var1, var2 + var4 - this.i, var3, this.i);
               var10[0] = new com.aspose.cells.b.a.b.zo(this.g, var4 - this.i / 2.0F + this.h);
               var10[1] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var4 - this.i / 2.0F + this.h);
               var10[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i / 2.0F + this.h);
               var10[3] = new com.aspose.cells.b.a.b.zo(this.g, this.i / 2.0F + this.h);
               this.a.a(var9, var20);
               this.a.a(var9, var19, 0.0F, -180.0F);
               this.a.a(var9, var10[0], var10[3]);
               var19.b(this.h);
               this.a.a(var9, var19, 180.0F, 180.0F);
               this.a.a(var9, var10[2], var10[1]);
            }
         }
      }

      this.b();
      this.a.a(var6);
   }

   void b() {
      this.a.d();
      com.aspose.cells.b.a.b.zq var1 = this.e.k();
      if (!this.e.m().a()) {
         var1.a(-(this.e.m().f() / 2.0F), -(this.e.m().f() / 2.0F));
      }

      float var2 = zbul.a(this.e.n());
      if (this.e.p() != 7 && this.e.p() != 9) {
         if (this.e.p() == 0 || this.e.p() == 8) {
            var1.c(var1.h() - var2);
         }
      } else {
         var1.a(var1.f() + var2);
      }

      var1.a(var1.f() + (float)this.e.d().a());
      var1.b(var1.g() + (float)this.e.d().b() + this.i);
      var1.c(var1.h() - (float)this.e.d().c());
      var1.d(var1.i() - (float)this.e.d().d());
      if (var1.i() < (float)this.e.n().d()) {
         float var3 = ((float)this.e.n().d() - var1.i()) / 2.0F;
         var1 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g() - var3, var1.h(), (float)this.e.n().d());
      }

      if (!this.e.t().equals("\n")) {
         zbul.a(this.a, this.e, var1, this.e.t(), this.e.s(), this.e.n(), this.e.o(), this.e.p(), this.e.q());
      }
   }
}
